home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / ERA6I3 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.5 KB  |  44 lines

  1. package com.sun.java.swing;
  2.  
  3. import java.awt.Color;
  4. import java.io.PrintStream;
  5. import java.util.Hashtable;
  6.  
  7. class DebugGraphicsInfo {
  8.    Color flashColor;
  9.    int flashTime;
  10.    int flashCount;
  11.    Hashtable componentToDebug;
  12.    JFrame debugFrame;
  13.    PrintStream stream;
  14.  
  15.    int getDebugOptions(JComponent component) {
  16.       if (this.componentToDebug == null) {
  17.          return 0;
  18.       } else {
  19.          Integer integer = (Integer)this.componentToDebug.get(component);
  20.          return integer == null ? 0 : integer;
  21.       }
  22.    }
  23.  
  24.    void log(String string) {
  25.       this.stream.println(string);
  26.    }
  27.  
  28.    void setDebugOptions(JComponent component, int debug) {
  29.       if (this.componentToDebug == null) {
  30.          this.componentToDebug = new Hashtable();
  31.       }
  32.  
  33.       this.componentToDebug.put(component, new Integer(debug));
  34.    }
  35.  
  36.    DebugGraphicsInfo() {
  37.       this.flashColor = Color.red;
  38.       this.flashTime = 100;
  39.       this.flashCount = 2;
  40.       this.debugFrame = null;
  41.       this.stream = System.out;
  42.    }
  43. }
  44.